import React, { useEffect } from 'react'
import axios from "axios"; //引入axios




import styles from './index.module.css'

function Dmoe() {
    const obj1 = {
        version: '1.0.0',
        issuer: 'huangmin',
        timestamp: Date.now(),
        scope: '0',
        auth: 'ddddXCVFDGHFHv'
    }
    axios(
        {
            method: 'post',
            url: 'http://172.26.2.18:3001/WCPS/MAIN/000_000_006',
            data: obj1,
            headers: {
                'Content-Type': 'text/plain;charset=UTF-8',
                // 'Access-Control-Allow-Origin': '*',
                // 'Access-Control-Allow-Methods': 'GET, POST, PATCH, DELETE',
                'Authorization': 'bearer 6b5b3ec4f0d34e12b967ddb2519fbfd7',
                // 'Access-Control-Allow-Headers': 'Content-Type, Authorisation',

            },
        }
    ).then(response => {
        const data = response.data;
        console.log('session>', data);
    })
        .catch(error => {
            console.log('session-error>', error);
            console.log(error);
        });


    //[]空数组相当于componentDidMount
    useEffect(() => {
        return () => {


        }
    }, []);


    //渲染组件
    return (
        <div className={styles.done_container}>我是待办</div>
    )
}

export default Dmoe;
